Solution:
pv = 1000 r = 0.03 n = 5 fv = pv * (1 + r) ** n print(f'The future value of the investment: {fv:.2f} USD')